/*
 * Created on 18 mars 2004
 * This interface propose the different method that must be implemented for each
 * supported databases
 * For orcle support, a SequenceOraImpl must implement this interface. Allows to
 * give the
 * Oracle functionnality witch are used for PK et FK Constraints on every
 * databases.
 */
package tu.java.db;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.SQLException;

/**
 * @author Alain-Jo�l
 * 
 * This interface propose the different method that must be implemented for each
 * supported databases
 * For orcle support, a SequenceOraImpl must implement this interface. Allows to
 * give the
 * Oracle functionnality witch are used for PK et FK Constraints on every
 * databases.
 * 
 * When implementing this interface, be carrefully of surcharging all the
 * abstract methods and don't
 * forget to add a static "CreateSequence" method that takes a sequenceName
 * parameter. It is
 * automatically invoke from the pool.
 * 
 */
public interface Sequence {
	
	
	
	public abstract BigDecimal getCurrentValue() throws SQLException;
	
	
	
	public abstract BigDecimal getNextValue() throws SQLException;
	
	
	
	public abstract BigDecimal getCurrentValue(Connection conn) throws SQLException;
	
	
	
	public abstract BigDecimal getNextValue(Connection conn) throws SQLException;
}
